﻿@model GsifWeb4.ViewModels.TrainingViewModel

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
        
    <fieldset>
        <legend>Fields</legend>

        <div class="editor-label">
            @Html.Label("Datum:")
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(m => Model.Training.Datum, new { @id = "datepicker", @Value = Model.Training.Datum.HasValue ? Model.Training.Datum.Value.ToString("yyyy-MM-dd") : "" })
            @Html.ValidationMessageFor(model => model.Training.Datum)
        </div>

        <div class="editor-label">
            @Html.Label("Lag:")
        </div>
        <div class="editor-field">
            @Html.DropDownList("TeamDD", Model.Teams)
            @Html.ValidationMessage("TeamDD", "*")
        </div>

        <div class="editor-label">
            @Html.Label("Plats:")
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.Training.Plats)
            @Html.ValidationMessageFor(model => model.Training.Plats)
        </div>

        <div class="editor-label">
            @Html.Label("Tid:")
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.Training.Tid)
            @Html.ValidationMessageFor(model => model.Training.Tid)
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}


